package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.common.service.base.ServiceImplBase;
import com.cloudbroker.bcs.platform.ltb.middle.dao.BannerDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.Banner;
import com.cloudbroker.bcs.platform.ltb.middle.service.BannerService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by daibd19671 on 2016/12/7.
 */
@Service
public class BannerServiceImpl extends TenantServiceImplBase<Banner,String> implements BannerService {

    @Resource
    private BannerDAO bannerDAO;

    @Override
    public List<Banner> list(Banner banner) {
        return bannerDAO.list(banner);
    }

    @Override
    protected DAOBase<Banner, String> getDAO() {
        return bannerDAO;
    }

    @Override
    public void updateBannerLevelAdd(Integer sourceLevel,Integer targetLevel) {
        bannerDAO.updateBannerLevelAdd(sourceLevel,targetLevel);
    }
    @Override
    public void updateBannerLevelReduce(Integer sourceLevel,Integer targetLevel) {
        bannerDAO.updateBannerLevelReduce(sourceLevel,targetLevel);
    }
}
